<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/{v?}', function ($v= 'Laravel 5  已经部署成功！') {
    //return view('welcome');  
    return view('welcome')->with(['v' => $v]);
});

//提供给手机端的API的路由
//0. API: 首页接口(2017-11-11根据前端提供的接口文档将首页接口合并为一个接口)
Route::get('/api/home', 'MobileApi\HomeController@GetPortalInfo');
//1. API：获取首页轮播图及相关内容
Route::get('/api/home/rollpic/{token?}', 'MobileApi\HomeController@GetHomeRollPicture');
//2. API: 获取首页【翻译中，点评中，优秀译文】板块的内容
Route::get('/api/home/threadlist/{token?}/{uid?}', 'MobileApi\HomeController@GetHomeGoodAndCommentArticle');
//3. API：获取首页【经典赏析】模块的内容
Route::get('/api/home/classics_appreciation/{token?}', 'MobileApi\HomeController@GetClassicsAppreciation');
//4. API: 获取首页【贤二漫画】板块内容
Route::get('/api/home/xianercartoon_info/{token?}', 'MobileApi\HomeController@GetXianercartoon');
Route::get('/api/home/test', 'MobileApi\HomeController@ce');
#任务翻译
Route::get('/api/translation/test', 'MobileApi\TranslationController@ce');
Route::get('/api/translation/original_article', 'MobileApi\TranslationController@original_article');
Route::get('/api/translation/list', 'MobileApi\TranslationController@lst');
Route::get('/api/translation/translationListOfTask', 'MobileApi\TranslationController@TranslationListOfTask');
Route::get('/api/translation/detail', 'MobileApi\TranslationController@detail');
Route::get('/api/translation/comment_list', 'MobileApi\TranslationController@comment_list');
Route::get('/api/translation/vote', 'MobileApi\TranslationController@vote');
Route::get('/api/translation/vote_list', 'MobileApi\TranslationController@vote_list');
Route::get('/api/translation/browse', 'MobileApi\TranslationController@browse');
Route::get('/api/translation/task_list', 'MobileApi\TranslationController@task_list');
Route::get('/api/translation/vote_result', 'MobileApi\TranslationController@vote_result');
Route::post('/api/translation/commit_vote', 'MobileApi\TranslationController@commit_vote');
Route::get('/api/translation/commit_vote', 'MobileApi\TranslationController@commit_vote');

Route::get('/api/outstandingTranslation', 'MobileApi\OutstandingTranslationController@get');

//Route::get('/api/ranklist/get', 'MobileApi\TranslationController@ce');
Route::get('/api/ranklist/get', 'MobileApi\RanklistController@get');

//双语阅读主题列表接口(bilingualReadingThreadList)
Route::get('/api/bilingualReadingThreadList/{boardChoice?}/{paegNo?}', 'MobileApi\BilingualReadingController@ListBilingualReading');

//发表回复接口(publishReply)
Route::post('/api/publishReply', 'MobileApi\PublishController@PublishReply');
Route::get('/api/publishReply', 'MobileApi\PublishController@PublishReply');

//登录接口(logout)
Route::get('/api/login', 'MobileApi\LoginController@login');
//退出登录接口(logout)
Route::get('/api/logout', 'MobileApi\LoginController@logout');
//获取登录状态(loginStatus)
Route::get('/api/loginStatus', 'MobileApi\LoginController@loginStatus');

//获取主题首帖
Route::get('/api/getThreadFirstPost', 'MobileApi\ThreadController@GetThreadFirstPost');

//在线词典
Route::get('/api/dict/lookup', 'MobileApi\DictController@Lookup');
Route::get('/api/dict/addDict', 'DictApi\DictController@addDict');
Route::get('/api/dict/getVocabulary', 'DictApi\DictController@getVocabulary');

//Route::get('/api/dict/cut', 'MobileApi\DictController@Cut');

/////////////////////////////////////////////
//测试
Route::get('/api/tonggao/test', 'TongGaoApi\TestController@test');
Route::get('/api/tonggao/testdiff', 'TongGaoApi\TestController@testdiff');
Route::get('/api/tonggao/testdict', 'TongGaoApi\TestController@testdict');

/** by gw***/
Route::get('/api/tonggao/excel', function ($v= 'EXCEL操作') {
    return view('excel')->with(['v' => $v]);
});
Route::get('/api/tonggao/excelexport','TongGaoApi\ExcelActionController@exportExcel');
Route::post('/api/tonggao/exceleimport','TongGaoApi\ExcelActionController@importExcel');
Route::get('/api/tonggao/excel_export_demo','TongGaoApi\ExcelActionController@exportExcelDemo');

/***gw end **/

Route::get('/api/tonggao/word_test1','TongGaoApi\WordActionController@wordTest1');
Route::get('/api/tonggao/word_read1','TongGaoApi\WordActionController@wordRead1');
Route::get('/api/tonggao/test_merge','TongGaoApi\WordActionController@testMergeFile');

//准备数据
Route::get('/api/tonggao/prepare/fillTermDetail', 'TongGaoApi\PrepareController@fillTermDetail');
Route::get('/api/tonggao/prepare/fillTermDetailEng', 'TongGaoApi\PrepareController@fillTermDetailEng');
Route::get('/api/tonggao/prepare/checkTermDetail', 'TongGaoApi\PrepareController@checkTermDetail');
Route::get('/api/tonggao/prepare/addSentenceSeqNo', 'TongGaoApi\PrepareController@addSentenceSeqNo');
Route::get('/api/tonggao/prepare/importArticle', 'TongGaoApi\PrepareController@importArticle');
Route::get('/api/tonggao/prepare/importTerm', 'TongGaoApi\PrepareController@importTerm');
Route::get('/api/tonggao/prepare/addTerm', 'TongGaoApi\PrepareController@addTerm');
Route::get('/api/tonggao/prepare/studyTermDetail', 'TongGaoApi\PrepareController@studyTermDetail');
Route::get('/api/tonggao/prepare/searchEmptyTermDetailEng', 'TongGaoApi\PrepareController@searchEmptyTermDetailEng');
Route::get('/api/tonggao/prepare/exportBook', 'TongGaoApi\PrepareController@exportBook');
Route::get('/api/tonggao/prepare/calcFreq', 'TongGaoApi\PrepareController@calcFreq');
Route::get('/api/tonggao/prepare/getSentence', 'TongGaoApi\PrepareController@getSentence');
Route::get('/api/tonggao/prepare/exportSentence', 'TongGaoApi\PrepareController@exportSentence');
Route::get('/api/tonggao/prepare/containedIn', 'TongGaoApi\PrepareController@containedIn');
Route::get('/api/tonggao/prepare/calcTermContainedIn', 'TongGaoApi\PrepareController@calcTermContainedIn');
Route::get('/api/tonggao/prepare/processContainedIn', 'TongGaoApi\PrepareController@processContainedIn');
Route::get('/api/tonggao/prepare/importTermDetail', 'TongGaoApi\PrepareController@importTermDetail');
Route::get('/api/tonggao/prepare/recoverTermDetail', 'TongGaoApi\PrepareController@recoverTermDetail');
Route::get('/api/tonggao/prepare/exportTermDetail', 'TongGaoApi\PrepareController@exportTermDetail');
Route::get('/api/tonggao/prepare/exportTermDetailByTerm', 'TongGaoApi\PrepareController@exportTermDetailByTerm');
Route::get('/api/tonggao/prepare/extractBookNameFromSentence', 'TongGaoApi\PrepareController@extractBookNameFromSentence');
Route::get('/api/tonggao/prepare/fillTermDetailBookname', 'TongGaoApi\PrepareController@fillTermDetailBookname');
Route::get('/api/tonggao/prepare/searchBuddhaname', 'TongGaoApi\PrepareController@searchBuddhaname');
Route::get('/api/tonggao/prepare/fixArticleIdInTermDetail', 'TongGaoApi\PrepareController@fixArticleIdInTermDetail');
Route::get('/api/tonggao/prepare/findMissingTermDetail', 'TongGaoApi\PrepareController@findMissingTermDetail');
Route::get('/api/tonggao/prepare/addMissing', 'TongGaoApi\PrepareController@addMissing');
Route::get('/api/tonggao/prepare/delDupTermDetail', 'TongGaoApi\PrepareController@delDupTermDetail');
Route::get('/api/tonggao/prepare/temp', 'TongGaoApi\PrepareController@temp');
Route::get('/api/tonggao/prepare/fillDemoId', 'TongGaoApi\PrepareController@fillDemoId');
Route::get('/api/tonggao/prepare/importGL', 'TongGaoApi\PrepareController@importGL');
Route::get('/api/tonggao/prepare/search_term', 'TongGaoApi\PrepareController@searchTerm');
Route::get('/api/tonggao/prepare/t_my_import_excel', 'TongGaoApi\PrepareController@tMyImportExcel');

Route::get('/api/tonggao/nlp/searchHighFreq', 'TongGaoApi\NLPController@searchHighFreq');
Route::get('/api/tonggao/nlp/calcDirectContainedIn', 'TongGaoApi\NLPController@calcDirectContainedIn');
Route::get('/api/tonggao/nlp/processFreqDirectContainedIn', 'TongGaoApi\NLPController@processFreqDirectContainedIn');
Route::get('/api/tonggao/nlp/export78', 'TongGaoApi\NLPController@export78');
Route::get('/api/tonggao/nlp/copyFromTerm', 'TongGaoApi\NLPController@copyFromTerm');
Route::get('/api/tonggao/nlp/fillTermSuper', 'TongGaoApi\NLPController@fillTermSuper');
Route::get('/api/tonggao/nlp/cleanLong', 'TongGaoApi\NLPController@cleanLong');

Route::get('/api/tonggao/nlp/importTermFromFile', 'TongGaoApi\NLPController@importTermFromFile');
Route::get('/api/tonggao/nlp/addRefNo', 'TongGaoApi\NLPController@addRefNo');
Route::get('/api/tonggao/nlp/matchSutra', 'TongGaoApi\NLPController@matchSutra');

Route::get('/api/tonggao/nlp/deleteTermFromFile', 'TongGaoApi\NLPController@deleteTermFromFile');
Route::get('/api/tonggao/nlp/showTermSentence', 'TongGaoApi\NLPController@showTermSentence');
Route::get('/api/tonggao/nlp/searchHighFreqWords', 'TongGaoApi\NLPController@searchHighFreqWords');

Route::get('/api/tonggao/nlp/remove_chinese', 'TongGaoApi\NLPController@removeChinese');
Route::get('/api/tonggao/nlp/remove_english', 'TongGaoApi\NLPController@removeEnglish');

Route::get('/api/tonggao/term/check456', 'TongGaoApi\TermController@check456');
Route::get('/api/tonggao/term/in456term', 'TongGaoApi\TermController@in456term');
Route::get('/api/tonggao/term/markCommon', 'TongGaoApi\TermController@markCommon');
Route::get('/api/tonggao/term/addTable', 'TongGaoApi\TermController@addTable');
Route::get('/api/tonggao/term/singleContained', 'TongGaoApi\TermController@singleContained');
Route::get('/api/tonggao/term/fillTermTypeFromTermDetail', 'TongGaoApi\TermController@fillTermTypeFromTermDetail');
Route::get('/api/tonggao/term/fillTermFreq', 'TongGaoApi\TermController@fillTermFreq');
Route::get('/api/tonggao/term/listTermContaining', 'TongGaoApi\TermController@listTermContaining');
Route::get('/api/tonggao/term/importSoothHill', 'TongGaoApi\TermController@importSoothHill');
Route::get('/api/tonggao/term/importFromStardict', 'TongGaoApi\TermController@importFromStardict');
Route::get('/api/tonggao/term/exportTerm', 'TongGaoApi\TermController@exportTerm');
Route::get('/api/tonggao/term/importTermFreq', 'TongGaoApi\TermController@importTermFreq');
Route::get('/api/tonggao/term/combine_dup_ddb', 'TongGaoApi\TermController@combineDupDDB');
Route::get('/api/tonggao/term/import_term_info', 'TongGaoApi\TermController@importTermInfo');
Route::get('/api/tonggao/term/import_term_info_raw', 'TongGaoApi\TermController@importTermInfoRaw');
Route::get('/api/tonggao/term/extract_sanskrit_pali', 'TongGaoApi\TermController@extractSanskritPali');
Route::get('/api/tonggao/term/import_term_ref_info', 'TongGaoApi\TermController@importTermRefInfo');


//1. 获取所有术语列表接口
Route::get('/api/tonggao/get_terms/{pattern?}/{size?}', 'TongGaoApi\TongGaoController@listTermsByPage');
//2. 查询包含某个术语的所有文稿
Route::get('/api/tonggao/get_articles_by_term/{size?}/{term_id?}', 'TongGaoApi\TongGaoController@listArticlesByTerm');
//3. 给定某个术语和某个文稿，查询术语详情，包括：这个术语在这个文稿不同位置的翻译、句对（中文和英文句子）、是否在统稿平台修改过。
Route::get('api/tonggao/get_term_detail_by_term_article/{term_id?}/{article_id?}/{size?}', 'TongGaoApi\TongGaoController@listTermDetailByTermArticleByPage');
//4. 查询某个term_detail对应的修改日志
Route::get('api/tonggao/get_logs_by_term_detail/{term_detail_id?}/{size?}', 'TongGaoApi\TongGaoController@listLogsByTermDetailByPage');
//5. 查询某个sentence对应的修改日志
Route::get('api/tonggao/get_sentence_logs/{sentence_id?}/{size?}', 'TongGaoApi\TongGaoController@listSentenceLogsByPage');
//6. 查询某个术语的每一种译法使用的次数 by lishu
Route::get('api/tonggao/get_count_per_translation_of_term/{term_id?}/{criteria?}', 'TongGaoApi\TongGaoController@listCountPerTranslationOfTerm');
//7. 查询某个术语的参考信息
Route::get('api/tonggao/get_term_info/{term_id?}', 'TongGaoApi\TongGaoController@listTermInfo');

Route::get('api/tonggao/get_term_info_by_chinese_key/{chinese_key?}', 'TongGaoApi\TongGaoController@listTermInfoByChineseKey');
Route::get('/api/tonggao/get_terms2/{chinese_key_part?}', 'TongGaoApi\TongGaoController@listTermsByPage2');

#7. 获取term_detail在句对中的相关信息
Route::get('/api/tonggao/get_sentence', 'TongGaoApi\SentenceController@get_sentence');
#6. 获取某个术语在龙泉寺审定数据库的信息
Route::get('/api/tonggao/get_term_info', 'TongGaoApi\SentenceController@get_term_info');
#8. 修改term_detail
Route::post('/api/tonggao/update_term_detail', 'TongGaoApi\SentenceController@update_term_detail');
Route::get('/api/tonggao/update_term_detail', 'TongGaoApi\SentenceController@update_term_detail');
Route::get('/api/tonggao/ce', 'TongGaoApi\SentenceController@ce');

#9&10. 获取同一稿件中同一术语的上一个/下一个出现的位置
Route::get('/api/tonggao/get_sentence_of_prev_term_detail', 'TongGaoApi\SentenceController@get_sentence_of_prev_term_detail');
Route::get('/api/tonggao/get_sentence_of_next_term_detail', 'TongGaoApi\SentenceController@get_sentence_of_next_term_detail');

//Route::get('/api/dict/cut', 'MobileApi\DictController@Cut');

Route::get('/api/tonggao/extract/get_term_detail/{term_id?}/{criteria?}', 'TongGaoApi\ExtractTermTranController@getTermDetail');
//Route::get('/api/tonggao/extract/match_term_tran/{term_id?}/{criteria?}/{indexes?}/{english_keys?}', 'TongGaoApi\ExtractTermTranController@matchTermTran');
Route::get('/api/tonggao/extract/t_match_term_tran/{term_id?}/{criteria?}/{english_keys?}/{mode?}', 'TongGaoApi\ExtractTermTranController@tMatchTermTran');

Route::get('/api/tonggao/dedicated1/conv_star_dict', 'TongGaoApi\Dedicated1Controller@convStarDict');
Route::get('/api/tonggao/dedicated1/export_term_info', 'TongGaoApi\Dedicated1Controller@exportTermInfo');
Route::get('/api/tonggao/dedicated1/ref_excel_to_word', 'TongGaoApi\Dedicated1Controller@refExcelToWord');
Route::get('/api/tonggao/dedicated1/del_dup_from_file', 'TongGaoApi\Dedicated1Controller@delDupFromFile');
Route::get('/api/tonggao/dedicated1/detect_word_from_file', 'TongGaoApi\Dedicated1Controller@detectWordFromFile');

Route::get('/api/tonggao/bib/gen_bib', 'TongGaoApi\BibController@genBib');
Route::get('/api/tonggao/bib/test_rtf', 'TongGaoApi\BibController@testRTF');







